﻿@using 第五课.Models.Database;
@using 第五课.Models
@{
    //Layout = null;
    var user = ViewData["User"] as User;
    var cars = ViewData["Cars"] as List<CarModel>;
}
<div class="container">
    <!-- InstanceBeginEditable name="MainBody" -->
    <br>
    <br>
    <br>
    <link rel="stylesheet" type="text/css" href="/css/userinfo.css" />
    <div class="xgs-row">

        <div class="xgs-col3" style="height: 300px;">
            <ul class="navtab">
                <li>
                    <a href="index.html">
                        <<返回首页
                    </a>
                </li>
                <li>
                    <a style="background-color: #69c0ff;color: white;" href="javascript:void(0);"
                       onclick="jumpTab('myinfo',this)">我的信息</a>
                </li>
                <li>
                    <a href="javascript:void(0);" onclick="jumpTab('cart',this)">
                        购物车


                        <span style="border-radius: 50%;background-color: #ff4d4f;width: 12px;display: block;">

                        </span>

                    </a>
                </li>
                <li><a href="javascript:void(0);" onclick="jumpTab('updatePassword',this)">修改密码</a></li>
                <li><a href="/home/loginout">退出登录</a></li>
            </ul>
        </div>

        <div class="xgs-col8  white-panel" style="padding: 0 15px;">
            <!-- 我的信息 -->
            <div class="myinfo" id="myinfo" style="padding: 25px 0 20px;">
                <div class="top content" style="border-bottom: 1px solid #d9d9d9;height: 120px;">
                    <img src="/img/xie.jpg" class="white-panel float-left" width="100px"
                         style="border-radius: 50%;border: #f5f5f5 1px solid;">
                    <div style="width: 75%;display: inline-block;margin-top: 35px;padding-left: 30px;line-height: 28px;">
                        <h3>@user.UserName</h3>
                        <small>个人说明...</small>
                    </div>
                </div>
                <br>
                <!-- 消息列表 -->
                <div class="bottom">
                    <ul class="notice-list">
                        <!-- <h3>消息列表</h3> -->
                        <li>
                            <h4>系统消息</h4>
                            <span>您关注的《女装橱柜》上新啦，快来围观~</span>
                        </li>
                        <li>
                            <h4>登录通知</h4>
                            <span>登录IP地址改变，请核实是否本人登录，如有异常，请联系客服处理！</span>
                        </li>
                        <li>
                            <h4>交易消息</h4>
                            <span>您的订单已打印，请及时处理！</span>
                        </li>
                    </ul>
                </div>

                <!-- /消息列表 -->
                <!-- /我的信息 -->
            </div>




            <!-- 购物车 -->
            <div class="cart content" id="cart" style="display: none;">
                @{
                    //在这里写C#代码
                    //循环遍历购物车列表数据
                    foreach (var item in cars)
                    {
                        //把里面对应的字段 换成数据的字段
                        <div class="xgs-row">
                            <div class="xgs-col2 pic">
                                <img src="@item.Cover" />
                            </div>
                            <div class="xgs-col10 cart-item">
                                <h4>@item.Name</h4>
                                <span class="price">价格：￥@item.Price</span>
                                <div class="operation">
                                    <a href="#" id="add">
                                        <img src="/img/icon/cart-add.png" />
                                    </a>
                                    <span class="quantity">@item.Count</span>
                                    <a href="#">
                                        <img src="/img/icon/cart-remve.png" />
                                    </a>
                                </div>
                            </div>
                        </div>
                    }
                }

                <div class="cart-btn">
                    <button type="button" class="cart-submit">立即下单</button>
                </div>
            </div>
            <!-- /购物车 -->
            <!-- 修改密码 -->
            <div class="updatePassword" id="updatePassword" style="display: none;">
                <br>
                <br>
                <br>
                <form action="#" method="post" class="form">
                    <div class="form-item">
                        <span>旧密码：</span><input type="text" name="" id="" value="" />
                    </div>
                    <div class="form-item">
                        <span>新密码：</span><input type="password" name="password" />
                    </div>
                    <div class="form-item">
                        <span>
                            确认密码：
                        </span> <input type="password" name="password2" />
                    </div>
                    <div class="btn-goup">
                        <button type="button" class="submit-btn">提交</button>
                        <button type="reset" class="submit-btn">重置</button>
                    </div>
                </form>
            </div>
            <!-- /修改密码 -->

        </div>

    </div>
</div>
